package cn.edu.ecust.controller.user;


import cn.edu.ecust.common.util.Resp;
import cn.edu.ecust.service.user.UserService;
import cn.edu.ecust.vo.request.LoginUserVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author cjj
 * @date 2023/08/30 21:54
 **/
@RestController
@RequestMapping("/user")
@Api(value = "用户管理", tags = {"用户管理"})
public class UserController {

    @Resource
    private UserService userService;

    @PostMapping("/login")
    @ApiOperation(value = "登录")
    public Resp login(@Validated @RequestBody LoginUserVO loginUserVO){
       return userService.login(loginUserVO);
    }
}
